<?php
/**
 * Created by IntelliJ IDEA.
 * User: lenovo
 * Date: 2019/1/12
 * Time: 15:24
 */
session_start();
$name="";
if(isset($_POST["name"]) && isset($_POST["pwd"])) {
    if ($_POST["name"] == "xiaoming" && $_POST["pwd"] == "123456"){
        $_SESSION["name"] = $_POST["name"];
    header("location:main.php");
    }else{
    $name="账号密码错误";
    }
}
require  "./login.html";